package com.fpt.dao;

import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.TypedQuery;

import org.springframework.stereotype.Repository;

import com.fpt.domain.Courses;

@Repository
public class LoaddataDaoImp implements LoaddataDao{

	@PersistenceContext
	EntityManager em;
	
	public List<Courses> doGetCourse() {
		TypedQuery<Courses> query = em.createQuery("select t from Courses t",Courses.class);
		return query.getResultList();
	}
 
}
